package com.springboot.template.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Zhang Yu
 * @description: 用户对象 security_user
 * @date 2024/5/30 16:19
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SecurityUser implements Serializable {
    /** id */
    private Long id;
    /**
     * 用户ID
     */
    private Long userId;

    /** 名称 */
    private String name;

    /** 请求令牌 */
    private String token;

    /** 密码 */
    private String password;
    /**
     * 渠道,用于作为请求需要鉴权的接口标识
     */
    private String channel;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expireTime;

    /** 备注 */
    private String remark;
}
